package com.zhou.combine.security.test.mapstruct;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * CarMapper
 *
 * @author zhouxianfeng
 * @date 2021-1-13
 */
@Mapper(componentModel = "spring")
public interface CarMapper {

     CarMapper INSTANCE = Mappers.getMapper( CarMapper.class );

    @Mapping(source = "numberOfSeats", target = "seatCount",numberFormat = "$#.00")
    @Mapping(source = "test1", target = "test2")
    CarDto carToCarDto(Car car);
}